<?php
namespace app\common\controller;

use app\common\controller\Base;

use think\Hook;
/**
 * 后台基本控制器
 * @author Yel
 */

class AdminBase extends Base{

	/**
	 * 初始化
	 * @author Yel  2019/7/5
	 * @copyright  yel
	 */
	public function _initialize(){

		//继承父类的初始化
        parent::_initialize();

        //监听用户权限
		Hook::listen('checkRule');  

		//监听用户是否登录
		$user = Hook::listen('checkLogin'); 
		$this->assign('user',$user[0]);
	}
	
}